package com.example.bootbook.domain;

import lombok.Data;

@Data
public class Result<T> {

    private Integer code;
    private Boolean flag;
    private String message;
    private T data;

    public Result(){}

    public Result(Integer code, Boolean flag, String message, T data) {
        this.code = code;
        this.flag = flag;
        this.message = message;
        this.data = data;
    }
    public Result(Integer code, Boolean flag, String message) {
        this.code = code;
        this.flag = flag;
        this.message = message;

    }

    public Result(Integer code, Boolean flag) {
        this.code = code;
        this.flag = flag;
    }
}
